package com.qf.fc.controller;



import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.qf.fc.Param.TopicAdd;
import com.qf.fc.entity.Topic;
import com.qf.fc.service.TopicService;
import com.qf.fc.vo.R;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.io.Serializable;
import java.util.List;

/**
 * 动态话题表(Topic)表控制层
 *
 * @author makejava
 * @since 2024-09-23 23:34:47
 */
@RestController
@RequestMapping("/api/topic/")
@Tag(name = "动态话题接口") //knife4j 接口文档
public class TopicController {
    /**
     * 服务对象
     */
    @Resource
    private TopicService service;

    @PostMapping("add")
    public R<String> addTopic(@RequestBody TopicAdd add){
        return service.add(add);
    }
    @GetMapping("top")
    public R top(){
        return service.queryTop();
    }
    @GetMapping("like")
    public R like(String name){
        return service.queryLike(name);
    }


}

